package io.renren.modules.user.controller;

import io.renren.common.utils.R;
import io.renren.common.utils.UploadUtil;
import io.renren.modules.sys.controller.AbstractController;
import io.renren.modules.user.service.UserIconService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.Map;

@RestController
@RequestMapping("/user")
public class UserIconController extends AbstractController {
    @Autowired
    private UserIconService userIconService;

   /*
    获得用户头像
    */
    @GetMapping("/iconUrl")
    public R getIcon(){
        String userId = getUserId() +"";
        String result = userIconService.getIcon(userId);
        return R.ok().put("iconUrl",result);
    }
}
